		<div id="admin_form" title="Connexion administrateur">
			<form>
			<fieldset>
				<label for="Password">Mot de passe :</label>
				<input type="password" name="Password" id="Password" value="" class="text ui-widget-content ui-corner-all" /><br />
				<br/>
			</fieldset>
			</form>
			<p class="validateTips"></p>
		</div>
		<script>
		{literal}
			$(function() {
				$( "#dialog:ui-dialog" ).dialog( "destroy" );
				
				var pass = $( "#Password" ),
					allFields = $( [] ).add( pass ),
					tips = $( ".validateTips" );
		
				function updateTips( t ) {
					tips
						.text( t )
						.addClass( "ui-state-highlight" );
					setTimeout(function() {
						tips.removeClass( "ui-state-highlight", 1500 );
					}, 500 );
				}
		
				function checkLength( o, n, min, max ) {
					if ( o.val().length > max || o.val().length < min ) {
						o.addClass( "ui-state-error" );
						updateTips( "La longueur du champs \"" + n + "\" doit être entre " +
							min + " et " + max + "." );
						return false;
					} else {
						return true;
					}
				}
		
				function checkRegexp( o, regexp, n ) {
					if ( !( regexp.test( o.val() ) ) ) {
						o.addClass( "ui-state-error" );
						updateTips( n );
						return false;
					} else {
						return true;
					}
				}
				
				$( "#admin_form" ).dialog({
					autoOpen: false,
					height: 300,
					width: 550,
					modal: true,
					buttons: {
						"Connexion": function() {
							allFields.removeClass( "ui-state-error" );
								
							$.post( "{/literal}{url_to controller="admin"}{literal}", { admin_form: 0, password: pass.val() },
								function(data){
									updateTips( data[1] ) ;
									
									if ( data[0] == 1 )
										setTimeout( function() {
												$( location ).attr( "href", "{/literal}{url_to controller="admin"}{literal}" );
											},
											1000 );
									else
										pass.addClass( "ui-state-error" );
								},
								"json");
							
						},
						"Reset": function() {
							pass.val( "" );
						},
						"Annuler": function() {
							$( location ).attr( "href", "{/literal}{url_to}{literal}" );
						}
					},
					close: function() {
						$( location ).attr( "href", "{/literal}{url_to}{literal}" );
					}
				});
		
				$( "#admin_form" ).dialog( "open" );
				
			});
		{/literal}
		</script>